#pragma once
#ifndef TM_BASE_HELPER_H_
#define TM_BASE_HELPER_H_

#pragma pack(push, 1)
typedef struct tagBITMAPFILEHEADER {
    short bfType;  //specifies the file type
    unsigned int bfSize;  //specifies the size in bytes of the bitmap file
    short bfReserved1;  //reserved; must be 0
    short bfReserved2;  //reserved; must be 0
    unsigned int bOffBits;  //species the offset in bytes from the bitmapfileheader to the bitmap bits
} BITMAPFILEHEADER;
#pragma pack(pop)

namespace recognition {

unsigned char* ReadBitmapImageFile(const char *name);
unsigned char* RawBmpToRgb(unsigned char *image, int height, int width);
unsigned char* ReadBmpRgb(const char *name, int height, int width);
unsigned char* BmpRgbToGrayscale(unsigned char *image, int height, int width);
double* UcharToNormalizedDouble(unsigned char *image, int height, int width);
double* MakeOdd(double *image, int &height, int &width);

}	// namespace recognition

#endif	// TM_BASE_HELPER_H_
